package cn.zwx.distributed.svc.service;

import cn.zwx.base.exception.BizWrapException;

/**
 * @author zhangwenxue
 */
public interface UidGeneratorService {

    /**
     * Get a unique ID
     *
     * @return UID
     * @throws BizWrapException ex
     */
    long getDistributedId() throws BizWrapException;

    /**
     * Parse the UID into elements which are used to generate the UID. <br>
     * Such as timestamp & workerId & sequence...
     *
     * @param uid
     * @return Parsed info
     */
    String parsDistributedId(long uid);
}
